package cn.getech.data.development.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 实时任务菜单
 */
@Data
@TableName("bdp_real_time_task")
public class RealTimeTask implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 目录id
     */
    @TableField("menu_id")
    private Integer menuId;

    /**
     * 任务类型，关联枚举类:RealTimeTaskType
     */
    @TableField("task_type")
    private Integer taskType;

    /**
     * 资源id
     */
    @TableField("resource_id")
    private Integer resourceId;

    /**
     * main函数
     */
    @TableField("main_function")
    private String mainFunction;

    /**
     * 参数项
     */
    @TableField("main_args")
    private String mainArgs;

    /**
     * 并行度
     */
    @TableField("parallelism")
    private Integer parallelism;

    /**
     * 工作内存
     */
    @TableField("job_manager_memory")
    private Integer jobManagerMemory;

    /**
     * 任务内存
     */
    @TableField("task_manager_memory")
    private Integer taskManagerMemory;

    /**
     * 插槽数
     */
    @TableField("slot")
    private Integer slot;

    /**
     * HDFS地址
     */
    @TableField("savepoint_path")
    private String savepointPath;

    /**
     * 运行状态，0 失败 1 成功 2 运行中 3 未运行
     */
    @TableField("run_state")
    private Integer runState;

    /**
     * 当前正在运行的applicationId
     */
    @TableField("application_id")
    private String applicationId;

    /**
     * 当前正在运行的jobId
     */
    @TableField("job_id")
    private String jobId;

    /**
     * 锁定状态，1：锁定，0：解锁
     */
    @TableField("lock_state")
    private Integer lockState;

    @TableField("update_per")
    private Integer updatePer;

    @TableField("update_time")
    private Date updateTime;

    @TableField("run_time")
    private Date runTime;

    @TableField("run_log_id")
    private Integer runLogId;

    @TableField("flink_sql")
    private String flinkSQL;
}
